import java.io.File;
import java.io.IOException;

public class demo2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./text.txt");
        System.out.println(file.createNewFile());//如果已经有了就创建false
        System.out.println(file.exists());
        System.out.println(file.isFile());
        System.out.println(file.isDirectory());

    }




}
